﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TicketMovie.Admin
{
    public partial class WebForm14 : System.Web.UI.Page
    {
        private DataClasses1DataContext dc = new DataClasses1DataContext();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                this.RepeatertypechairList.DataSource = this.dc.Type_chairs.ToList();
                this.RepeatertypechairList.DataBind();
            }
        }
        protected void HiddenFieldDelTypeChair(object sender, EventArgs e)
        {
            LinkButton lb = (LinkButton)sender;
            HiddenField hf = (HiddenField)lb.Parent.FindControl("HiddenFieldDelTypeChair");
            Type_chair tpch = this.dc.Type_chairs.Single(tp => tp.type_chair1 == Convert.ToString(hf.Value));
            this.dc.Type_chairs.DeleteOnSubmit(tpch);
            this.dc.SubmitChanges();
        }
    }
}